Xbasic

RANDOM_RECORD_LIST Function

Syntax

Record_List as C = random_record_list(N count [,C filter])

Arguments

count

The number of record numbers to return. Numeric

filter

Optional. Default = ".T." (all records). A character filter expression that limits the number of records to select from.

Returns

Record_ListCharacter

A space delimited list of random record numbers. Numeric

Description

Selects a random list of records from the current DBF table.

Discussion

The RANDOM_RECORD_LIST() function returns a list of random record numbers from the current table.

Example

This script, placed under a button on a form, displays three random record numbers from the current table.

ui_msg_box("", "" + random_record_list(3))

See Also